feat(app): start the Assistant minimized on desktop (0289) - #445
Merged
Conversation
The floating Assistant island opened over the editor on every desktop load. `floatAi` defaults to false so it starts collapsed to its reopener pill — the workspace is clear at rest and the full island is one click away. `floatAi` is desktop-only (MobileShell ignores it) and non-persisted, so the default is authoritative each session. Adds a regression test guarding the minimized default and a changelog fragment for the user-facing change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: xNet Test <test@xnet.dev>
crs48
force-pushed
the
claude/assistant-minimized-desktop-pr-83413e
branch
from
July 10, 2026 13:50
df841b5 to
094eabd
Compare
Contributor
🖼️ UI changes in this PRScreensAuto-captured by CI · run. Informational — not a blocking check. |
Contributor
|
Preview removed for PR #445. |
crs48
added a commit
that referenced
this pull request
Jul 10, 2026
## What `@xnetjs/devkit`'s `NodeCommandRunner` now scrubs git's repo-location environment variables (`GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE`, and friends) for `git` invocations, so the explicit `cwd` is always authoritative. An explicit `options.env` entry still wins. ## Why `RunOptions.cwd` is required precisely so a caller "can never accidentally run in `process.cwd()`" — but git reads `GIT_DIR`/`GIT_WORK_TREE`/`GIT_INDEX_FILE` from the environment **over** `cwd`. A husky hook (`pre-commit`/`pre-push`) exports exactly those vars pointing at the hook's repo. So when the pre-push hook runs `pnpm test`, devkit's real-repo tests (`git.test.ts`) spawned `git` children that inherited the hook's `GIT_DIR` and operated on the **actual worktree** instead of their temp repo — running `git config`, `git commit`, and even `git push` against it. This was not hypothetical: it clobbered a live worktree and its remote branch during PR #445 (and recurred on #444) — the worktree's `user.name`/`email` got overwritten and junk `initial`/`checkpoint` commits were pushed to origin. ## How - `command-runner.ts`: for `command === 'git'`, merge `{ ...process.env, ...<git-location vars set to undefined>, ...options.env }`. Node's `spawn` omits `undefined`-valued env keys, so the inherited leak is dropped while any explicit override is preserved. The scrubbed set is documented in the new `GIT_LOCATION_ENV` (module-internal — not added to the package barrel, so no public API change → **patch**). ## Tests - `command-runner.test.ts`: with a leaked bogus `GIT_DIR`, `git rev-parse --is-inside-work-tree` still resolves the `cwd` repo (would be fatal without the scrub); and an explicit `options.env` `GIT_DIR` still wins. - `git.test.ts`: a `checkpoint()` lands in `cwd` while `GIT_*` points at a decoy, and the decoy never becomes a repo. - Ran the two devkit test files directly (13 passing). Did **not** run the full suite locally, to avoid re-triggering the very leak this fixes on an unpatched checkout. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
The floating Assistant island opened over the editor on every desktop load. It now starts minimized — collapsed to its reopener pill — so the workspace is clear at rest. The full island is one click away via the pill.
Why
The Assistant claiming editor space at launch is intrusive when the user hasn't asked for it. Starting minimized keeps the surface calm while leaving the assistant a single click away.
How
apps/web/src/workbench/state.ts:floatAidefault flippedtrue → false.floatAiis desktop-only —MobileShelldoesn't renderFloatingDock, so there's zero mobile impact.floatAiis non-persisted (excluded from the store'spartialize), so the default is authoritative every session.floatAi === false,FloatingDockalready renders the "Open assistant" reopener pill instead of<Assistant />— no other wiring needed.floating-assistant-default.test.tsguarding the minimized default.app,ai).Verification
surfaces.test.tspass.vitest runpasses (0 failures) — an earlier local pre-push run had flaky failures in the hub concurrent-load smoke test and devkit git timing tests, unrelated to this change; a clean re-run was green.🤖 Generated with Claude Code